
# project和test文件夹下各个头文件自动化 添加
MyIncludePath := $(COMMON_INCLUDE_PATH) $(MY_MAIN_FUNCTION_COMMON_INCLUDE) $(MY_MAIN_FUNCTION_CMC_INCLUDE) $(MY_MAIN_FUNCTION_MAIN_INCLUDE) $(MY_MAIN_FUNCTION_TEST_INCLUDE) 
MyIncludePath_GCC := $(MyIncludePath) $(shell ls -d $(TEST_Path)/*/ | sed 's/\// -I\//')
MyIncludePath_LINUX := $(MyIncludePath) $(shell ls -d $(PROJECT_Path)/*/ | sed 's/\// -I\//')


MyObjPath_CC  = $(MAIN_Path)/obj/linux/*.o
MyObjPath_LCC  = $(MAIN_Path)/obj/gcc/*.o

all:creat_cmc creat_test creat_main
	@echo -e $(MY_SUCCESS)
	@echo "$(shell pwd) : all Success"
	@echo -e $(AC_NULL)		
	
clean:
	rm -f $(OUTPUT_Path)/exe/*
	rm -rf $(MAIN_Path)/obj/*
	@echo -e $(MY_SUCCESS)
	@echo "$(shell pwd) : clean Success"
	@echo -e $(AC_NULL)	
	
creat_main:
	$(CC) -Wall -I $(MyIncludePath) $(MyIncludePath_LINUX) -o main main.c $(MyObjPath_CC)
	mv main $(OUTPUT_Path)/exe/main
creat_test:
	$(LCC) -Wall -I $(MyIncludePath) $(MyIncludePath_GCC) -o test test.c $(MyObjPath_LCC)
	mv test $(OUTPUT_Path)/exe/test
creat_cmc:
	$(CC) -Wall -I $(MyIncludePath) $(MyIncludePath_LINUX) -o cmc_linux cmc.c $(MyObjPath_CC)
	mv cmc_linux $(OUTPUT_Path)/exe/cmc_linux
	$(LCC) -Wall -I $(MyIncludePath) $(MyIncludePath_GCC) -o cmc_gcc cmc.c $(MyObjPath_LCC)
	mv cmc_gcc $(OUTPUT_Path)/exe/cmc_gcc
	